package com.juyu.miliao.common.constant;

/**
 * 用户实时位置位置reids key
 * @author xuanqicheng
 */
public class HostRealTimeLocationRedisKey {

    private static final String HOST_REAL_TIME_LOCATION_HASH_KEY = "hostRealTimeLocation:";

    private static final String LOCATION_FIELD_KEY = "location";

    private static final String PROVINCE_FIELD_KEY = "province";

    private static final String CITY_FIELD_KEY = "city";

    /**
     * 用户实时位置位置 KEY
     * 结构为hash
     * @param userId
     * @return
     */
    public static String getHashKey(long userId){
        return HOST_REAL_TIME_LOCATION_HASH_KEY+userId;
    }

    /**
     * 经纬度,格式：lat,lon
     * 结构为：纬度(lat),经度(lon)
     * @return
     */
    public static String getLocationField(){
        return LOCATION_FIELD_KEY;
    }

    public static String getProvinceField(){
        return PROVINCE_FIELD_KEY;
    }

    public static String getCityField(){
        return CITY_FIELD_KEY;
    }

}
